package com.example.dameng.service.impl;

import com.example.dameng.entity.*;
import com.example.dameng.mapper.UserMapper;
import com.example.dameng.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("UserService")
public class UserServiceImpl implements UserService{
    @Autowired
    UserMapper userMapper;

    @Override
    public Integer userLogin(int userCode,String userPasswd){
        return userMapper.userLogin(userCode,userPasswd);
    }

    @Override
    public Integer adminLogin(int adminCode, String adminPasswd,int adminType){
        return userMapper.adminLogin(adminCode,adminPasswd,adminType);
    }
    @Override
    public Double getConsumptionList(int userCode,String month){ return userMapper.getConsumptionList(userCode,month);}

    @Override
    public Double getConsumeNum(int userCode,String month){ return userMapper.getConsumeNum(userCode,month);}
    @Override
    public PersonalInfo getPersonalInfo(int userCode){ return userMapper.getPersonalInfo(userCode);}

}
